import request from '/@/utils/request';

/**
 * 行政区域操作接口
 */
export function useRegionApi() {
	return {
		regionPageList: (data={}) => {
			return request<any, AjaxResult>({
				url: '/region/PageList',
				method: 'post',
				data,
			});
		},
		getRegionList: (params?: object) => {
			return request<any, AjaxResult>({
				url: '/region/List',
				method: 'get',
				params,
			});
		},
		addRegion: (data={}) => {
			return request<any, AjaxResult>({
				url: '/region/Add',
				method: 'post',
				data,
			});
		},
		editRegion: (data={}) => {
			return request<any, AjaxResult>({
				url: '/region/Update',
				method: 'post',
				data,
			});
		},
		deleteRegion: (data={}) => {
			return request<any, AjaxResult>({
				url: '/region/Delete',
				method: 'post',
				data,
			});
		},
		syncRegion: (data={}) => {
			return request<any, AjaxResult>({
				url: '/region/Sync',
				method: 'post',
				data,
			});
		},
	};
}
